3.208 \(\int \frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{c+d \sec (e+f x)}} \, dx\)

Optimal. Leaf size=198 \[ -\frac{2 \sqrt{c+d} \cot (e+f x) (a+b \sec (e+f x)) \sqrt{-\frac{(b c-a d) (1-\sec (e+f x))}{(c+d) (a+b \sec (e+f x))}} \sqrt{\frac{(b c-a d) (\sec (e+f x)+1)}{(c-d) (a+b \sec (e+f x))}} \Pi \left (\frac{a (c+d)}{(a+b) c};\sin ^{-1}\left (\frac{\sqrt{a+b} \sqrt{c+d \sec (e+f x)}}{\sqrt{c+d} \sqrt{a+b \sec (e+f x)}}\right )|\frac{(a-b) (c+d)}{(a+b) (c-d)}\right )}{c f \sqrt{a+b}} \]

[Out]

(-2*Sqrt[c + d]*Cot[e + f*x]*EllipticPi[(a*(c + d))/((a + b)*c), ArcSin[(Sqrt[a + b]*Sqrt[c + d*Sec[e + f*x]])
/(Sqrt[c + d]*Sqrt[a + b*Sec[e + f*x]])], ((a - b)*(c + d))/((a + b)*(c - d))]*Sqrt[-(((b*c - a*d)*(1 - Sec[e
+ f*x]))/((c + d)*(a + b*Sec[e + f*x])))]*Sqrt[((b*c - a*d)*(1 + Sec[e + f*x]))/((c - d)*(a + b*Sec[e + f*x]))
]*(a + b*Sec[e + f*x]))/(Sqrt[a + b]*c*f)

________________________________________________________________________________________

Rubi [A]  time = 0.106149, antiderivative size = 198, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.034, Rules used = {3936} \[ -\frac{2 \sqrt{c+d} \cot (e+f x) (a+b \sec (e+f x)) \sqrt{-\frac{(b c-a d) (1-\sec (e+f x))}{(c+d) (a+b \sec (e+f x))}} \sqrt{\frac{(b c-a d) (\sec (e+f x)+1)}{(c-d) (a+b \sec (e+f x))}} \Pi \left (\frac{a (c+d)}{(a+b) c};\sin ^{-1}\left (\frac{\sqrt{a+b} \sqrt{c+d \sec (e+f x)}}{\sqrt{c+d} \sqrt{a+b \sec (e+f x)}}\right )|\frac{(a-b) (c+d)}{(a+b) (c-d)}\right )}{c f \sqrt{a+b}} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b*Sec[e + f*x]]/Sqrt[c + d*Sec[e + f*x]],x]

[Out]

(-2*Sqrt[c + d]*Cot[e + f*x]*EllipticPi[(a*(c + d))/((a + b)*c), ArcSin[(Sqrt[a + b]*Sqrt[c + d*Sec[e + f*x]])
/(Sqrt[c + d]*Sqrt[a + b*Sec[e + f*x]])], ((a - b)*(c + d))/((a + b)*(c - d))]*Sqrt[-(((b*c - a*d)*(1 - Sec[e
+ f*x]))/((c + d)*(a + b*Sec[e + f*x])))]*Sqrt[((b*c - a*d)*(1 + Sec[e + f*x]))/((c - d)*(a + b*Sec[e + f*x]))
]*(a + b*Sec[e + f*x]))/(Sqrt[a + b]*c*f)

Rule 3936

Int[Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)], x_Symbol] :> Simp[(
2*(a + b*Csc[e + f*x])*Sqrt[((b*c - a*d)*(1 + Csc[e + f*x]))/((c - d)*(a + b*Csc[e + f*x]))]*Sqrt[-(((b*c - a*
d)*(1 - Csc[e + f*x]))/((c + d)*(a + b*Csc[e + f*x])))]*EllipticPi[(a*(c + d))/(c*(a + b)), ArcSin[(Rt[(a + b)
/(c + d), 2]*Sqrt[c + d*Csc[e + f*x]])/Sqrt[a + b*Csc[e + f*x]]], ((a - b)*(c + d))/((a + b)*(c - d))])/(c*f*R
t[(a + b)/(c + d), 2]*Cot[e + f*x]), x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2,
 0] && NeQ[c^2 - d^2, 0]

Rubi steps

\begin{align*} \int \frac{\sqrt{a+b \sec (e+f x)}}{\sqrt{c+d \sec (e+f x)}} \, dx &=-\frac{2 \sqrt{c+d} \cot (e+f x) \Pi \left (\frac{a (c+d)}{(a+b) c};\sin ^{-1}\left (\frac{\sqrt{a+b} \sqrt{c+d \sec (e+f x)}}{\sqrt{c+d} \sqrt{a+b \sec (e+f x)}}\right )|\frac{(a-b) (c+d)}{(a+b) (c-d)}\right ) \sqrt{-\frac{(b c-a d) (1-\sec (e+f x))}{(c+d) (a+b \sec (e+f x))}} \sqrt{\frac{(b c-a d) (1+\sec (e+f x))}{(c-d) (a+b \sec (e+f x))}} (a+b \sec (e+f x))}{\sqrt{a+b} c f}\\ \end{align*}

Mathematica [A]  time = 5.1912, size = 336, normalized size = 1.7 \[ \frac{4 \sin ^2\left (\frac{1}{2} (e+f x)\right ) \csc (e+f x) \sqrt{a+b \sec (e+f x)} \sqrt{\frac{(c+d) \cot ^2\left (\frac{1}{2} (e+f x)\right )}{c-d}} \sqrt{\frac{(a+b) \csc ^2\left (\frac{1}{2} (e+f x)\right ) (c \cos (e+f x)+d)}{a d-b c}} \left (c (a+b) \text{EllipticF}\left (\sin ^{-1}\left (\frac{\sqrt{\frac{(a+b) \csc ^2\left (\frac{1}{2} (e+f x)\right ) (c \cos (e+f x)+d)}{a d-b c}}}{\sqrt{2}}\right ),\frac{2 (b c-a d)}{(a+b) (c-d)}\right )-a (c+d) \Pi \left (\frac{b c-a d}{a c+b c};\sin ^{-1}\left (\frac{\sqrt{\frac{(a+b) (d+c \cos (e+f x)) \csc ^2\left (\frac{1}{2} (e+f x)\right )}{a d-b c}}}{\sqrt{2}}\right )|\frac{2 (b c-a d)}{(a+b) (c-d)}\right )\right )}{c f (a+b) \sqrt{c+d \sec (e+f x)} \sqrt{\frac{(c+d) \csc ^2\left (\frac{1}{2} (e+f x)\right ) (a \cos (e+f x)+b)}{b c-a d}}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + b*Sec[e + f*x]]/Sqrt[c + d*Sec[e + f*x]],x]

[Out]

(4*Sqrt[((c + d)*Cot[(e + f*x)/2]^2)/(c - d)]*Sqrt[((a + b)*(d + c*Cos[e + f*x])*Csc[(e + f*x)/2]^2)/(-(b*c) +
 a*d)]*Csc[e + f*x]*((a + b)*c*EllipticF[ArcSin[Sqrt[((a + b)*(d + c*Cos[e + f*x])*Csc[(e + f*x)/2]^2)/(-(b*c)
 + a*d)]/Sqrt[2]], (2*(b*c - a*d))/((a + b)*(c - d))] - a*(c + d)*EllipticPi[(b*c - a*d)/(a*c + b*c), ArcSin[S
qrt[((a + b)*(d + c*Cos[e + f*x])*Csc[(e + f*x)/2]^2)/(-(b*c) + a*d)]/Sqrt[2]], (2*(b*c - a*d))/((a + b)*(c -
d))])*Sqrt[a + b*Sec[e + f*x]]*Sin[(e + f*x)/2]^2)/((a + b)*c*f*Sqrt[((c + d)*(b + a*Cos[e + f*x])*Csc[(e + f*
x)/2]^2)/(b*c - a*d)]*Sqrt[c + d*Sec[e + f*x]])

________________________________________________________________________________________

Maple [A]  time = 0.376, size = 352, normalized size = 1.8 \begin{align*} -2\,{\frac{\cos \left ( fx+e \right ) \left ( \sin \left ( fx+e \right ) \right ) ^{2}}{f \left ( -1+\cos \left ( fx+e \right ) \right ) \left ( d+c\cos \left ( fx+e \right ) \right ) \left ( a\cos \left ( fx+e \right ) +b \right ) } \left ({\it EllipticF} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }\sqrt{{\frac{a-b}{a+b}}}},\sqrt{{\frac{ \left ( c-d \right ) \left ( a+b \right ) }{ \left ( a-b \right ) \left ( c+d \right ) }}} \right ) a-{\it EllipticF} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }\sqrt{{\frac{a-b}{a+b}}}},\sqrt{{\frac{ \left ( c-d \right ) \left ( a+b \right ) }{ \left ( a-b \right ) \left ( c+d \right ) }}} \right ) b-2\,{\it EllipticPi} \left ({\frac{-1+\cos \left ( fx+e \right ) }{\sin \left ( fx+e \right ) }\sqrt{{\frac{a-b}{a+b}}}},-{\frac{a+b}{a-b}},{\sqrt{{\frac{c-d}{c+d}}}{\frac{1}{\sqrt{{\frac{a-b}{a+b}}}}}} \right ) a \right ) \sqrt{{\frac{a\cos \left ( fx+e \right ) +b}{\cos \left ( fx+e \right ) }}}\sqrt{{\frac{d+c\cos \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }}}\sqrt{{\frac{d+c\cos \left ( fx+e \right ) }{ \left ( c+d \right ) \left ( 1+\cos \left ( fx+e \right ) \right ) }}}\sqrt{{\frac{a\cos \left ( fx+e \right ) +b}{ \left ( a+b \right ) \left ( 1+\cos \left ( fx+e \right ) \right ) }}}{\frac{1}{\sqrt{{\frac{a-b}{a+b}}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e))^(1/2)/(c+d*sec(f*x+e))^(1/2),x)

[Out]

-2/f/((a-b)/(a+b))^(1/2)*(EllipticF((-1+cos(f*x+e))*((a-b)/(a+b))^(1/2)/sin(f*x+e),((a+b)*(c-d)/(a-b)/(c+d))^(
1/2))*a-EllipticF((-1+cos(f*x+e))*((a-b)/(a+b))^(1/2)/sin(f*x+e),((a+b)*(c-d)/(a-b)/(c+d))^(1/2))*b-2*Elliptic
Pi((-1+cos(f*x+e))*((a-b)/(a+b))^(1/2)/sin(f*x+e),-(a+b)/(a-b),((c-d)/(c+d))^(1/2)/((a-b)/(a+b))^(1/2))*a)*cos
(f*x+e)*(1/cos(f*x+e)*(a*cos(f*x+e)+b))^(1/2)*sin(f*x+e)^2*((d+c*cos(f*x+e))/cos(f*x+e))^(1/2)*(1/(c+d)*(d+c*c
os(f*x+e))/(1+cos(f*x+e)))^(1/2)*(1/(a+b)*(a*cos(f*x+e)+b)/(1+cos(f*x+e)))^(1/2)/(-1+cos(f*x+e))/(d+c*cos(f*x+
e))/(a*cos(f*x+e)+b)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{b \sec \left (f x + e\right ) + a}}{\sqrt{d \sec \left (f x + e\right ) + c}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))^(1/2)/(c+d*sec(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(b*sec(f*x + e) + a)/sqrt(d*sec(f*x + e) + c), x)

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))^(1/2)/(c+d*sec(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a + b \sec{\left (e + f x \right )}}}{\sqrt{c + d \sec{\left (e + f x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))**(1/2)/(c+d*sec(f*x+e))**(1/2),x)

[Out]

Integral(sqrt(a + b*sec(e + f*x))/sqrt(c + d*sec(e + f*x)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{b \sec \left (f x + e\right ) + a}}{\sqrt{d \sec \left (f x + e\right ) + c}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e))^(1/2)/(c+d*sec(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(b*sec(f*x + e) + a)/sqrt(d*sec(f*x + e) + c), x)